home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / util / shell / SphinxExtraDocs.lha / Docs / Differences&Bugs.doc < prev    next >
Encoding:
Text File  |  1992-05-16  |  8.8 KB  |  182 lines

  1.  
  2.                   Sphinx.doc v2.6x
  3.          © 1992, Nicolas Dade. All Rights Reserved
  4.  permission is hereby granted for non-commercial duplication and distribution
  5.           doc file for the SPHINX: AmigaDOS device
  6.  last revised: May 16th, 1992
  7.  
  8.             - - - - - - - - - - - - - - - - - -
  9.  
  10. Incompatibilities & Strange Differences between SPHINX and CON/NEWCON
  11.  
  12. SPHINX does not have a RAW mode.
  13.  
  14. The first SPHINX window opened prints an opening message before anything
  15. else.
  16.  
  17. The input buffer holds 255 bytes. Most characters take only one byte,
  18. allowing 255 characters/line, not including the final LF, like NEWCON.
  19. However characters C-@,C-A,C-B,C-C and C-D ($00 through $04) take three
  20. bytes to store.
  21.  
  22. When a SPHINX is shutting down, its window's title is cleared while the
  23. memory used by the text is being freed (before the window itself is closed).
  24. This is in order to give you a visual cue that SPHINX is shutting down.
  25.  
  26. When the first BELL character ($07) is printed, the bell file is loaded into
  27. memory. Thereafter that data is shared between all the SPHINX windows that
  28. are using the same bell file name (no longer just those that have the same
  29. configuration).
  30. Of course if the file is not found, if none is specified, or if the file is
  31. not understood, the screen is flashed, like NEWCON and CON (DisplayBeep()).
  32. When a BELL is seen in text being drawn to the window, the bell is rung (or
  33. the screen flashed) while the text is being drawn, and the BELL character is
  34. not saved. Thus the BELL character will not show up when you clip text. In
  35. order to ring the bell, a seperate task is created, which is used by all the
  36. SPHINXs. This task is given the same priority as the SPHINX that created it,
  37. which currently would be the first SPHINX set running in the machine.
  38. This allows the BELL to be used as an attention signal at the end of a long
  39. script: put an
  40.  echo "G"
  41. (control-G, of course, not just plain G) (and in fact, RA-L,C-G since C-G
  42. alone will just be interpreted as a command to un-defer the scrolling and
  43. un-stop the output)
  44. where you desire the bell to be rung, when the script reaches that point, the
  45. bell will be rung, making noise, which is better for attention getting
  46. purposes than flashing the screen (if you're, say, doing something in another
  47. room). Of course there are a multitude of other ways of achieving this same
  48. end, but it doesn't hurt to have one more.
  49.  
  50. When a FF (form feed, $0c) character is written to the window, instead of
  51. clearing the window and putting the cursor in the upper left corner, like
  52. CON/NEWCON, the current line is finished, and an embossed line is drawn
  53. from the end of the current line to the right margin. The line following
  54. the startup message in the first window is an example of this.
  55.  
  56. When a TAB ($09) is written to the window, the cursor is moved to the right
  57. modulo 8*(write font width) pixels from the left margin. If this is beyond
  58. the right edge, the a new line is started.
  59.  
  60. When a window is to be opened, but it is not going to fit in the screen, it
  61. is moved and/or shrunk so that that may be opened.
  62.  
  63. There are some programs that add menus to a CLI window. Some of these
  64. programs do not expect the window to not be handled by console.device, and
  65. may crash. (To be honest I have not found any which do not crash)
  66.  
  67. The only CSIs (command strings) understood by SPHINX are a window bounds
  68. request (CSI0 q) and those which deal with the color and style of the text
  69. (SGRs: Bold, Italics, UnderLine, Negative, TextColor, BackGroundColor and
  70. Reset). Also the only ESC codes understood by SPHINX are ESC[ as an equivalent
  71. to CSI and ESCc as a RESET. All others are stripped out of the text and
  72. ignored. This had to be done because things that made sense with the
  73. console.device no longer do so with SPHINX (like cursor up or down a line,
  74. etc...). Because of this, programs that use the cursor positioning facilities
  75. of CON/NEWCON to draw complicated text will print the same text with SPHINX,
  76. but on lines that follow each other, so the picture will come out wrong.
  77.  
  78. The CR (carriage return, $0d) and LF (line feed, $0a) characters are treated
  79. both as "finish current line, and move down one line and to the left margin."
  80. Therefore programs that write (Write()) lines of text that end (or start) with
  81. a CR, which with CON/NEWCON would have drawn over the old text, draw their
  82. text on a new line with SPHINX. This isn't so bad as it seems because SPHINX
  83. saves all these lines, so you can go back and look at them. (for example,
  84. search, diskformat & diskcopy do this)
  85.  
  86. When a block of text (one Write() or 32K or the tail of the old write buffer,
  87. which ever is smaller) is written to the window and that block would cause the
  88. window to scroll if it were drawn, the window is scrolled first, and then the
  89. visible tail of the block is drawn (CON/NEWCON would draw the text one line at
  90. a time, scrolling as they went). For large writes, this is much faster then
  91. drawing the text and then having it scroll off the window (you can always go
  92. back and look at that text any how) (to see the difference, try this in a
  93. SPHINX CLI and a NEWCON CLI: (if you are using arp, make sure that BCPL is
  94. TRUE by first typing
  95.  set BCPL TRUE
  96. )
  97.  copy longtextfile to *
  98. The NEWCON window will scroll along displaying the file. The SPHINX will jump
  99. along drawing only the tail of each Write() from copy).
  100.  
  101. Since I save the search string when searching, when you exit searching with
  102. S-DOWN I can restore the input buffer to what it was. NEWCON just leaves it
  103. blank.
  104.  
  105. When SPHINX receives a keystroke it does not understand it inserts it as if
  106. it were a literal, instead of ignoring it like CON/NEWCON do. This gives you
  107. a cue that SPHINX has not done something internal in response to this key,
  108. but rather just doesn't understand it. This also applies to ascii commands
  109. inside a string returned from a key mapped to a string (mapped by the default
  110. keymap, not SPHINX); the offending command is inserted into the input buffer.
  111.  
  112. See also below
  113.  
  114.             - - - - - - - - - - - - - - - - - -
  115.  
  116. Bugs & Problems & Things to Watch Out For with SPHINX:
  117.  
  118. There is a bug somewhere in the scroll gadget code. Sometimes whe cursor ends
  119. up in wild places (imagery only). FIX: if you notice this then resize the
  120. window (iconifying won't do it) (but RA-O will); a resize causes a lot of
  121. things to be recomputed from scratch, including the X,Y coordinates of the
  122. cursor.
  123.  
  124. SPHINX insists that the font you use fit at least one character per line. if
  125. it does not, SPHINX just draws over the borders of the window. This does not
  126. crash the machine, nor even SPHINX; it is just visually unsettling.
  127.  
  128. When the write font is drawn in italics, it can cover part of the borders of
  129. the window, and the parts of it that stick out are not scrolled with the
  130. rest, leaving you with little dots on either side of the window. This can
  131. also happen if either font is using kerning (and the kerning value is
  132. non-zero). All of this is harmless; just the imagery is messed up.
  133.  
  134.             - - - - - - - - - - - - - - - - - -
  135.  
  136. Extra for programers and equivalently knowledged users:
  137.  
  138. SPHINX dynamically allocates and frees memory as it goes along. If you are
  139. trying to tell if a program of yours is using memory by watching a memory
  140. meter, then you must not touch any SPHINX windows, nor cause any text to be
  141. written to them, etc... . SPHINXs do not allocate and free memory except in
  142. response to some external event (they don't wake up without you either
  143. causing some intuition msg or packet, or the timer's reply due to a
  144. WaitForChar packet you sent previously or the FileInserter bringing back
  145. some text...)
  146.  
  147. SPHINX does not use the console.device except for RawKeyConvert(). Therefore
  148. if you are hacking console.device (why would that marvelous piece of code
  149. need hacking?) you may use SPHINX for a console if you let SPHINX use
  150. RawKeyConvert().
  151.  
  152. SPHINX understands these packet types:
  153. OpenOld, OpenNew, Update, Read, Write, WaitForChar, Close, DiskInfo. It does
  154. not understand Die.
  155.  
  156.             - - - - - - - - - - - - - - - - - -
  157.  
  158. How to speed SPHINX up:
  159. (approximately in order of greatest difference to least)
  160.  
  161. things to do to SPHINX:
  162. 1) Iconize the window.
  163. 2) Scroll backwards so that the cursor is out of sight/disable automatic
  164.    scrolling (SC-S).
  165. 3) Reduce the window's size.
  166. 4) Enable the half-wd scrolling option and/or the monochrome option.
  167. 5) Use the default font (or whatever font is speed up) for the write font (and
  168.    speed that font up using FF, BlitzFont, etc...). (WB1.3 only)
  169. 6) Change cursors: underline is fastest, followed by thinline, then thickline,
  170.    then block.
  171.  
  172. (things to do to the program talking to SPHINX:
  173. 1) BUFFER YOUR OUTPUT. Sending it one character at a time is not fast with
  174.    any device. Sending it one line at a time is better. SPHINX likes it even
  175.    more if you send it all in one great block (although note that doing this
  176.    with NEWCON can lead to text scrolling off the window without the user
  177.    being able to stop it; C= recommends 256 bytes at a time in the 2.0
  178.    devices RKM).
  179. )
  180.             - - - - - - - - - - - - - - - - - -
  181.  
  182.